# coding=utf-8
import re
import sys

input_file = open(sys.argv[1]).read()

rules = []

search = r"(_((.|\n)*?) ;)|(//.*)"
def rep(m):
        rule = m.group(1)
        if rule == None:
                rule = m.group(4)
        rules.append(rule)
        

re.sub(search, rep, input_file)

while len(rules):
        print rules.pop() + '\n'